package com.mapper;

import cn.hutool.core.lang.Pid;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.TbProducts;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ProductsMapper extends BaseMapper<TbProducts> {
    @Update("update tb_products set product_state=1 where product_id=#{pid}")
    int updateState1(int pid);

    @Update("update tb_products set product_state=0 where product_id=#{pid}")
    int updateState0(int pid);

    @Update("update tb_products set product_attention=1 where product_id=#{pid}")
    int updateAttention1(int pid);

    @Update("update tb_products set product_attention=0 where product_id=#{pid}")
    int updateAttention0(int pid);
}
